package com.wsm.provider.controller;

import com.wsm.api.serivce.ApiService;
import com.wsm.common.dto.request.DtoRequest;
import com.wsm.common.dto.response.DtoResponse;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.cloud.context.config.annotation.RefreshScope;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author ：wangshimin
 * @date ：Created in 2020-10-29 下午 05:41
 * @description：
 * @version:
 */
@Slf4j
@RefreshScope
@RestController
@Api(tags = "测试接口集合")
public class DubboController implements ApiService {

    @Value("${nacosConfig.value:null}")
    private String nacosConfigValue;

    @Override
    @ApiOperation("测试接口")
    public DtoResponse getTest(@RequestBody DtoRequest dtoRequest) {
        return DtoResponse.builder().response("feign调用成功,返回字段为+" + nacosConfigValue).build();
    }
}
